home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / lzo / lzo1b.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-06-09  |  5.7 KB  |  157 lines

  1. /* lzo1b.h -- public interface of the LZO1B compression algorithm
  2.  
  3.    This file is part of the LZO real-time data compression library.
  4.  
  5.    Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
  6.    Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
  7.    Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
  8.    Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
  9.    Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
  10.    Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
  11.    Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
  12.    Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
  13.    Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
  14.    Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  15.    All Rights Reserved.
  16.  
  17.    The LZO library is free software; you can redistribute it and/or
  18.    modify it under the terms of the GNU General Public License,
  19.    version 2, as published by the Free Software Foundation.
  20.  
  21.    The LZO library is distributed in the hope that it will be useful,
  22.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24.    GNU General Public License for more details.
  25.  
  26.    You should have received a copy of the GNU General Public License
  27.    along with the LZO library; see the file COPYING.
  28.    If not, write to the Free Software Foundation, Inc.,
  29.    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  30.  
  31.    Markus F.X.J. Oberhumer
  32.    <markus@oberhumer.com>
  33.    http://www.oberhumer.com/opensource/lzo/
  34.  */
  35.  
  36.  
  37. #ifndef __LZO1B_H_INCLUDED
  38. #define __LZO1B_H_INCLUDED
  39.  
  40. #ifndef __LZOCONF_H_INCLUDED
  41. #include "lzoconf.h"
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48.  
  49. /***********************************************************************
  50. //
  51. ************************************************************************/
  52.  
  53. /* Memory required for the wrkmem parameter.
  54.  * When the required size is 0, you can also pass a NULL pointer.
  55.  */
  56.  
  57. #define LZO1B_MEM_COMPRESS      ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
  58. #define LZO1B_MEM_DECOMPRESS    (0)
  59.  
  60.  
  61. /* compression levels */
  62. #define LZO1B_BEST_SPEED             1
  63. #define LZO1B_BEST_COMPRESSION       9
  64. #define LZO1B_DEFAULT_COMPRESSION  (-1)     /* fastest by default */
  65.  
  66.  
  67. LZO_EXTERN(int)
  68. lzo1b_compress          ( const lzo_bytep src, lzo_uint  src_len,
  69.                                 lzo_bytep dst, lzo_uintp dst_len,
  70.                                 lzo_voidp wrkmem,
  71.                                 int compression_level );
  72.  
  73. /* decompression */
  74. LZO_EXTERN(int)
  75. lzo1b_decompress        ( const lzo_bytep src, lzo_uint  src_len,
  76.                                 lzo_bytep dst, lzo_uintp dst_len,
  77.                                 lzo_voidp wrkmem /* NOT USED */ );
  78.  
  79. /* safe decompression with overrun testing */
  80. LZO_EXTERN(int)
  81. lzo1b_decompress_safe   ( const lzo_bytep src, lzo_uint  src_len,
  82.                                 lzo_bytep dst, lzo_uintp dst_len,
  83.                                 lzo_voidp wrkmem /* NOT USED */ );
  84.  
  85.  
  86. /***********************************************************************
  87. //
  88. ************************************************************************/
  89.  
  90. LZO_EXTERN(int)
  91. lzo1b_1_compress        ( const lzo_bytep src, lzo_uint  src_len,
  92.                                 lzo_bytep dst, lzo_uintp dst_len,
  93.                                 lzo_voidp wrkmem );
  94. LZO_EXTERN(int)
  95. lzo1b_2_compress        ( const lzo_bytep src, lzo_uint  src_len,
  96.                                 lzo_bytep dst, lzo_uintp dst_len,
  97.                                 lzo_voidp wrkmem );
  98. LZO_EXTERN(int)
  99. lzo1b_3_compress        ( const lzo_bytep src, lzo_uint  src_len,
  100.                                 lzo_bytep dst, lzo_uintp dst_len,
  101.                                 lzo_voidp wrkmem );
  102. LZO_EXTERN(int)
  103. lzo1b_4_compress        ( const lzo_bytep src, lzo_uint  src_len,
  104.                                 lzo_bytep dst, lzo_uintp dst_len,
  105.                                 lzo_voidp wrkmem );
  106. LZO_EXTERN(int)
  107. lzo1b_5_compress        ( const lzo_bytep src, lzo_uint  src_len,
  108.                                 lzo_bytep dst, lzo_uintp dst_len,
  109.                                 lzo_voidp wrkmem );
  110. LZO_EXTERN(int)
  111. lzo1b_6_compress        ( const lzo_bytep src, lzo_uint  src_len,
  112.                                 lzo_bytep dst, lzo_uintp dst_len,
  113.                                 lzo_voidp wrkmem );
  114. LZO_EXTERN(int)
  115. lzo1b_7_compress        ( const lzo_bytep src, lzo_uint  src_len,
  116.                                 lzo_bytep dst, lzo_uintp dst_len,
  117.                                 lzo_voidp wrkmem );
  118. LZO_EXTERN(int)
  119. lzo1b_8_compress        ( const lzo_bytep src, lzo_uint  src_len,
  120.                                 lzo_bytep dst, lzo_uintp dst_len,
  121.                                 lzo_voidp wrkmem );
  122. LZO_EXTERN(int)
  123. lzo1b_9_compress        ( const lzo_bytep src, lzo_uint  src_len,
  124.                                 lzo_bytep dst, lzo_uintp dst_len,
  125.                                 lzo_voidp wrkmem );
  126.  
  127.  
  128. /***********************************************************************
  129. // better compression ratio at the cost of more memory and time
  130. ************************************************************************/
  131.  
  132. #define LZO1B_99_MEM_COMPRESS   ((lzo_uint32) (65536L * lzo_sizeof_dict_t))
  133.  
  134. LZO_EXTERN(int)
  135. lzo1b_99_compress       ( const lzo_bytep src, lzo_uint  src_len,
  136.                                 lzo_bytep dst, lzo_uintp dst_len,
  137.                                 lzo_voidp wrkmem );
  138.  
  139.  
  140. #define LZO1B_999_MEM_COMPRESS  ((lzo_uint32) (3 * 65536L * sizeof(lzo_xint)))
  141.  
  142. LZO_EXTERN(int)
  143. lzo1b_999_compress      ( const lzo_bytep src, lzo_uint  src_len,
  144.                                 lzo_bytep dst, lzo_uintp dst_len,
  145.                                 lzo_voidp wrkmem );
  146.  
  147.  
  148.  
  149. #ifdef __cplusplus
  150. } /* extern "C" */
  151. #endif
  152.  
  153. #endif /* already included */
  154.  
  155.  
  156. /* vim:set ts=4 et: */
  157.